package com.xyz.study.design_mode.p_mediator.mode;

/**
 * 角色：ConcreteColleague 具体的同事
 *
 * @author XYZ
 * @version 1.0
 * @since 2023/1/11
 */
public class XiaoMing extends Colleague {

    @Override
    public String name() {
        return "小明";
    }

    @Override
    public void colleagueChanged() {
        System.out.println(name()+ "：我陪妹妹看完电影了");
        mediator.colleagueChanged(this);
    }

    @Override
    void controlColleague() {
        System.out.println("妈妈：" + name()+ "去陪妹妹看电影");
    }
}
